﻿@using DevM.Web.Views.Shared.Components.TopBarLanguageSwitch
@model TopBarLanguageSwitchViewModel
<li class="dropdown">
    <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button">
        <i class="@Model.CurrentLanguage.Icon" title="@Model.CurrentLanguage.DisplayName"></i>
        <span>@Model.CurrentLanguage.DisplayName</span>
        <b class="caret"></b>
    </a>
    <ul class="dropdown-menu pull-right">
        @foreach (var language in Model.Languages)
        {
            if (language.Name != Model.CurrentLanguage.Name)
            {
                <li><a href="@(ApplicationPath)AbpLocalization/ChangeCulture?cultureName=@(language.Name)&returnUrl=@(Context.Request.Path)"><i class="@language.Icon"></i> @language.DisplayName</a></li>
            }
        }
    </ul>
</li>
